hfrApp.directive('blogselector', function() {
	
  return {
    restrict: 'E',
    scope: {
    	selectors: '=sinfo'
    },
    templateUrl: 'app/views/blogs/selectors/selectors.html'
  }
});

hfrApp.directive('backButton', ['$window', function($window) {
    return {
        restrict: 'A',
        link: function (scope, elem, attrs) {
            elem.bind('click', function () {
                $window.history.back();
            });
        }
    };
}]);


hfrApp.directive('ngEnter', function() {
    return function(scope, element, attrs) {
        element.bind("keydown keypress", function(event) {
            if(event.which === 13) {
                scope.$apply(function(){
                    scope.$eval(attrs.ngEnter, {'event': event});
                });

                event.preventDefault();
            }
        });
    };
});